#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int Count(char* Str, char* Substr)
{
	char* p1 = Str;
	char* p2 = Substr;
	int count = 0;
	while (*Str != '\0')
	{
		p1 = Str;
		p2 = Substr;
		if (*p1 == *Substr)
		{
			while (*p2 != 0)
			{
				if (*p1 != *p2)
					break;
				p2++;
				p1++;
			}
		}
		if (*p2 == '\0')
			count++;
		Str++;
	}
	return count;
}
int main()
{
	char arr1[20] = { 0 };
	char arr2[10] = { 0 };
	scanf("%s", arr1);
	scanf("%s", arr2);
	int count= Count(arr1,arr2);
	printf("%d", count);
	return 0;
  }